﻿<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.evolutility.com" title="查看所有订单" icon="cube.gif" description="">
  <data dbtable="MRP_Order" splogin="asp.net membership" dbcolumnpk="ID" sppaging="EvoSP_PagedItem @SQLselect, @SQLtable, @SQLfrom, @SQLwhere, @SQLorderby, @SQLpk, @pageid, @pagesize" />
  <panel userid="1" ppos="1" label="订单信息" width="100">
    <field id="1137" type="text" typeid="5" label="订单号" dbcolumn="OrderCode" dbcolumnread="OrderCode" maxlength="0" readonly="0" required="1" optional="" fpos="70" search="1" searchadv="1" searchlist="1" height="1" width="80" />
    <field id="132" type="lov" typeid="5" label="销售人员" dbcolumn="EmployeeID" dbcolumnread="EmployeeName"
           dbtablelov="MRP_Employee" dbcolumnreadlov="Name"  maxlength="0" readonly="0" required="1" optional="" fpos="30" search="0" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="131" type="lov" typeid="5" label="客户" dbcolumn="CustomerID" dbcolumnread="CompanyName"
           dbtablelov="MRP_Customer" dbcolumnreadlov="CompanyName" maxlength="0" readonly="0" required="1" optional="" fpos="30" search="0" searchadv="1" searchlist="1" height="1" width="50" />
    <field id="133" type="date" typeid="17" label="下单时间" format="{0:d}" dbcolumn="OrderDate" defaultvalue="_now" dbcolumnread="OrderDate" maxlength="4" readonly="0" required="1" optional="" fpos="30" search="1" searchadv="1" searchlist="1" height="1" width="25" />
    <field id="134" type="lov" typeid="5" label="订单状态" defaultvalue="1" dbcolumn="Status" dbcolumnread="OrderStatus"
dbtablelov="View_Order_Status_List" dbcolumnreadlov="DisplayText" maxlength="0" readonly="0" required="0" optional="" fpos="30" search="0" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="1134" type="lov" typeid="5" label="订单类型" defaultvalue="2" dbcolumn="OrderType" dbcolumnread="OrderType1"
dbtablelov="View_OrderType_List" dbcolumnreadlov="DisplayText" maxlength="0" readonly="1" required="0" optional="" fpos="30" search="0" searchadv="1" searchlist="1" height="1" width="20" />
    <field id="136" type="date" typeid="17" label="交货时间" format="{0:d}" dbcolumn="ShippedDate" dbcolumnread="ShippedDate" maxlength="4" readonly="0" required="" optional="" fpos="60" search="1" searchadv="1" searchlist="" height="1" width="30" />
    <field id="1691" type="command" typeid="99" label="操作" dbcolumn="手动关闭订单" link="javascript:closeOrder(@itemid);"
           dependency="![SQL]:Select [Quantity] from [View_GetProductImportInfoByOrder] where Status=2 and ID=@itemID and Quantity is not null" 
           dbcolumnread="cmd1" maxlength="8" readonly="1" required="" optional="" fpos="120" search="1" searchadv="1" searchlist="1" height="1" width="10" />
    <field id="1692" type="command" typeid="99" label="操作" dbcolumn="取消订单" link="javascript:cancelOrder(@itemid);" 
           dependency="[SQL]:Select [Quantity] from [View_GetProductImportInfoByOrder] where ID=@itemID and (Quantity is not null or Status!=2)" 
           dbcolumnread="cmd2" maxlength="8" readonly="1" required="" optional="" fpos="120" search="1" searchadv="1" searchlist="1" height="1" width="10" />
  </panel>
  <tab label="订单明细">
    <panel-details panelid="1" dbtabledetails="MRP_OrderDetail" dbcolumndetails="OrderID" label="">
      <field id="146" panelid="1" type="lov" typeid="5" label="产品代码（名称、规格等等）" dbcolumn="ProductID" dbcolumnread="Name" dbcolumnreadlov="Name" dbwherelov="MRP_MaterialMain.MType=5" dbtablelov="MRP_MaterialMain" maxlength="2" readonly="0" required="1" optional="" fpos="20" search="1" searchadv="1" searchlist="1" height="1" width="20" />
      <field id="147" panelid="1" type="integer" typeid="10" label="数量" dbcolumn="Quantity" dbcolumnread="Quantity" maxlength="8" readonly="0" required="1" optional="" fpos="30" search="1" searchadv="1" searchlist="1" height="1" width="20" />
      <field id="1472" panelid="1" type="integer" typeid="10" label="已出库数量" dbcolumn="StockedQty" dbcolumnread="StockedQty" maxlength="8" readonly="0" required="1" optional="" fpos="30" search="1" searchadv="1" searchlist="1" height="1" width="20" />
      <field id="1473" panelid="1" type="integer" typeid="10" label="已签收数量" dbcolumn="SendedQty" dbcolumnread="SendedQty" maxlength="8" readonly="0" required="1" optional="" fpos="30" search="1" searchadv="1" searchlist="1" height="1" width="20" />
      <field id="149" panelid="1" type="date" typeid="17" format="{0:d}" label="交货时间" dbcolumn="RequiredDate" dbcolumnread="RequiredDate" maxlength="4" readonly="0" required="" optional="" fpos="50" search="1" searchadv="1" searchlist="1" height="1" width="30" />
      <field id="152" panelid="1" type="textmultiline" typeid="6" label="备注" defaultvalue="备注" dbcolumn="Note" dbcolumnread="Note" maxlength="256" readonly="0" required="" optional="" fpos="80" search="1" searchadv="1" searchlist="" height="3" width="100" />
      <field panelid="1" label="完成" help="Field shows as header field for lists" labellist="完成" type="boolean" dbcolumn="IsComplete" dbcolumnread="IsComplete" required="0" search="" searchlist="1" searchadv="" width="50" img="checkg.gif" />
    </panel-details>
  </tab>
  <tab label="货运信息">
    <panel userid="1" ppos="1" label="" width="100">
      <field id="137" type="text" typeid="5" label="货运方式" dbcolumn="ShipVia" dbcolumnread="ShipVia" maxlength="0" readonly="0" required="" optional="" fpos="70" search="1" searchadv="1" searchlist="" height="1" width="20" />
      <field id="139" type="textmultiline" typeid="6" label="交货方式" dbcolumn="DeliveryModel" dbcolumnread="DeliveryModel" maxlength="256" readonly="0" required="" optional="" fpos="90" search="1" searchadv="1" searchlist="" height="2" width="20" />
      <field id="138" type="textmultiline" typeid="6" label="货运地址" dbcolumn="ShipAddress" dbcolumnread="ShipAddress" maxlength="1024" readonly="0" required="" optional="" fpos="80" search="1" searchadv="1" searchlist="" height="2" width="80" />
      <field id="140" type="textmultiline" typeid="6" label="描述" dbcolumn="Description" dbcolumnread="Description" maxlength="256" readonly="0" required="" optional="" fpos="100" search="1" searchadv="1" searchlist="" height="3" width="100" />
    </panel>
  </tab>
  <queries label="预定义的查询">
    <query label="未完成订单" dbwhere="t.Status = '2'" url="ImCompleted" />
    <query label="所有订单" dbwhere="1=1" url="All" />
  </queries>
</form>